package com.zw.yzk.kabu.model;

import android.os.Parcel;
import android.os.Parcelable;


/**
 * Created by zhanwei on 2017/3/12.
 */

public class SubmitGoods implements Parcelable {
    // 产品id
    private int goodsId;
    // 产品数量
    private int count;
    // 商品组合属性id
    private String skuId;
    //图片
    private String image;
    //属性
    private String property;
    //价格
    private float price;
    //产品名称
    private String name;
    //运费
    private float freight;
    //购物车id
    private int shoppingCardId;

    public int getShoppingCardId() {
        return shoppingCardId;
    }

    public void setShoppingCardId(int shoppingCardId) {
        this.shoppingCardId = shoppingCardId;
    }

    public float getFreight() {
        return freight;
    }

    public void setFreight(float freight) {
        this.freight = freight;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getSkuId() {
        return skuId;
    }

    public void setSkuId(String skuId) {
        this.skuId = skuId;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public SubmitGoods() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.goodsId);
        dest.writeInt(this.count);
        dest.writeString(this.skuId);
        dest.writeString(this.image);
        dest.writeString(this.property);
        dest.writeFloat(this.price);
        dest.writeString(this.name);
        dest.writeFloat(this.freight);
        dest.writeInt(this.shoppingCardId);
    }

    protected SubmitGoods(Parcel in) {
        this.goodsId = in.readInt();
        this.count = in.readInt();
        this.skuId = in.readString();
        this.image = in.readString();
        this.property = in.readString();
        this.price = in.readFloat();
        this.name = in.readString();
        this.freight = in.readFloat();
        this.shoppingCardId = in.readInt();
    }

    public static final Creator<SubmitGoods> CREATOR = new Creator<SubmitGoods>() {
        @Override
        public SubmitGoods createFromParcel(Parcel source) {
            return new SubmitGoods(source);
        }

        @Override
        public SubmitGoods[] newArray(int size) {
            return new SubmitGoods[size];
        }
    };
}
